<!--<?php
if($rg_allowregister == 1){
if ($inv_linkopen){
print <<<EOT
-->
<div class="p10">
<h5 class="h5"><strong class="mr20">宣传链接</strong></h5>
<div class="p10 mb10">
<textarea class="textareaA mb5">{$inv_linkcontent}</textarea>
<p>复制上面的链接，发给你熟悉的人，让他们来这里看看你吧</p>
<!--
EOT;
if ($inv_linktype) {print <<<EOT
-->
<p>每注册一个用户，你可以赚取<b>{$inv_linkscore}个{$credit->cType[$inv_linkcredit]}</b>的宣传奖励，同时你们会成为好友哦</p>
<!--
EOT;
}else {print <<<EOT
-->
<p>来自每个ip的访问，你可以赚取<b>{$inv_linkscore}个{$credit->cType[$inv_linkcredit]}</b>的宣传奖励哦</p>
<!--
EOT;
}print <<<EOT
-->

</div>
</div>
<!--
EOT;
}
if($ml_mailifopen){print <<<EOT
-->
<div class="p10">
<h5 class="h5"><strong class="mr20">通过邮箱邀请</strong>（网站不会记录您的任何账号、密码信息）</h5>
<div class="mb20">
<ul class="half mailadd cc">
<!--
EOT;
if(function_exists('curl_init')){print <<<EOT
-->
   	<li><a href="javascript:;" onclick="sendmsg('pw_ajax.php?action=friendinvite&step=email');"><p>导入邮箱通讯录至邀请名单</p>支持<b class="s4">126、163、Gmail</b>等3种邮箱</a></li>
    <li><a href="javascript:;" onclick="sendmsg('pw_ajax.php?action=friendinvite&step=msn');"><p>导入MSN联系人至邀请名单</p>导入<b class="s4">MSN</b>账户中的联系人名单</a></li>
<!--
EOT;
}print <<<EOT
-->
    <li><a href="javascript:;" onclick="sendmsg('pw_ajax.php?action=friendinvite&step=simple');"><p>直接发送邀请邮件</p>直接向对方的邮箱发送邀请邮件</a></li>
    <li><a href="javascript:;" onclick="sendmsg('pw_ajax.php?action=friendinvite&step=csv');"><p>导入邮箱客户端联系人备份文件</p>支持<b class="s4">csv</b>备份文件导入</a></li>
</ul>
</div>
</div>
<!--
EOT;
}if(!$ml_mailifopen && !$inv_linkopen){
print <<<EOT
-->
<div class="p15 tac f14">您还没有开启宣传链接或者邮箱功能</div>
<!--
EOT;
}}elseif ($rg_allowregister == 2) {print <<<EOT
-->
<script type="text/javascript">
function inviteCode(form,type){
	var content = '';
	var str = type == 'copy' ? "\\n" : ',';
    var url = type == 'copy' ? '$db_bbsurl/$db_registerfile?invcode=' : '';
	for (var i = 0; i < form.elements.length; i++) {
		var e = form.elements[i];
		if (e.type == 'checkbox' && e.checked == true && e.value != 'all') {
			content += url + e.value + str;
		}
	}
	if(content == ''){
		showDialog('error','请选择要发送的邀请码',0);
		return false;
	}
	if(type == 'copy'){
		if (is_ie) {
			window.clipboardData.setData("Text", content);
			showDialog('success','已成功复制',1);
		} else {
			prompt('按下 Ctrl+C 复制到剪贴板', content)
		}
	}else{
	     sendmsg('pw_ajax.php?action=friendinvite&step=simple&invcode='+content);
	}
}
</script>
<div class="c mb10">&nbsp;</div>
<!--
EOT;
if(empty($invdb)){
print <<<EOT
-->
<div class="p15 tac f14">没有可用的邀请码，请到<a href="u.php?a=friend&type=inviteCode">邀请码管理</a>中购买</div>
<!--
EOT;
}else{
print <<<EOT
-->
<div class="p10">
<h5 class="h5 mb10"><strong class="mr20">邀请码</strong></h5>
<form method="post" action="" name="INVLINKS">
<table width="100%" class="tA mb20">
    <tr class="tr">
     	<td>
     		<label><input name="" type="checkbox" value="all" onclick="CheckAll(this.form)"> 全选</label>
		</td>
        <td>可用邀请链接</td>
        <td>有效期</td>
    </tr>
<!--
EOT;
foreach($invdb as $key => $value){
$invlink = $db_bbsurl.'/'.$db_registerfile.'?invcode=' . $value['invcode'];
print <<<EOT
-->
    <tr>
    	<td><p><input name="invlink" type="checkbox" value="{$value[invcode]}"></p></td>
        <td><p><input type="text" value="{$invlink}" class="input" size="80" readonly="readonly"/></p></td>
        <td><p>{$value[overtime]}</p></td>
    </tr>
<!--
EOT;
}print <<<EOT
-->
</table>	
<div class="p10 tac">{$pages}</div>
<div class="p10 tac">
	<span class="bt"><span><button type="button" onclick="inviteCode(document.INVLINKS,'copy')">复制邀请链接到剪切板</button></span></span>
	<span class="btn"><span><button type="button" onclick="inviteCode(document.INVLINKS)">通过邮箱发送邀请链接</button></span></span>
</div>
</form>
</div>
<!--
EOT;
}}?>-->